Skip to content

Use shared AdbRunner from android-tools for device listing#10880

Closed
rmarinho wants to merge 3 commits intomainfrom
feature/use-shared-adb-runner
Closed

Use shared AdbRunner from android-tools for device listing#10880
rmarinho wants to merge 3 commits intomainfrom
feature/use-shared-adb-runner

Conversation

@rmarinho
Copy link
Copy Markdown
Member

@rmarinho rmarinho commented Mar 3, 2026

Summary

Delegates the adb devices -l parsing, description building, and device/emulator merging logic from the GetAvailableAndroidDevices MSBuild task to the shared AdbRunner in Xamarin.Android.Tools.AndroidSdk (via the external/xamarin-android-tools submodule).

This removes ~200 lines of duplicated parsing/formatting/merging code from dotnet/android and consolidates it in the shared android-tools library where it can be reused by other consumers (e.g., the MAUI DevTools CLI).

Changes

Commits (3)

  1. 20af13558 — Bump xamarin-android-tools to b4da013 (FormatDisplayName fix)
  2. 8d6881750 — Use shared AdbRunner from android-tools for device listing
  3. 38f202f88 — Update GetAvailableAndroidDevices.cs (hoist CreateTaskLogger() out of loop per @jonathanpeppers)

Review Feedback Addressed

Reviewer Issue Fix
@jonathanpeppers ParseAdbDevicesOutput should take IEnumerable<string> Done in android-tools #283 — avoids string.Join allocation
@jonathanpeppers Add Action<TraceLevel, string> logger parameter Done in android-tools #283 — routes debug messages through MSBuild logger
@jonathanpeppers Hoist CreateTaskLogger() out of loop Done in commit 38f202f88

CI Status

Currently failing on all 3 platforms (Linux, macOS, Windows) with RS0026 errors from the PublicAPI analyzer in the submodule. Blocked on android-tools #298 which splits AcceptLicensesAsync overloads to eliminate optional-parameter ambiguity.

Dependencies

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants